<!DOCTYPE html>
<html lang='en'>

<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
  <div id='app'>
    <div>
      <son :msg="msgFa"></son>
    </div>
  </div>
  <script type='text/javascript'>
    Vue.component('son', {
      data() {
        return {
          msgSon: '这是子元素的数据'
        }
      },
      template: `
        <div>{{ msgSon + '================' + msg}}</div>
      `,
      props: ['msg']

    })
    var vm = new Vue({
      el: '#app',
      data: {
        msgFa: '这是父元素的数据'
      },
      methods: {

      }
    });
  </script>
</body>

</html>